<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"  %>

<% 
	HttpServletRequest hsr = request;
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	pageContext.setAttribute("basePath",basePath);
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理 - 智慧碎片</title>
<link type="text/css" rel="stylesheet" href="${ basePath}css/style.css" />
<script type="text/javascript" src="${ basePath}scripts/function-manage.js"></script>
</head>
<body onload="show(${requestScope.flag})">
<div id="header">
	<div id="logo"><img src="${ basePath}images/logo.png" width="15px" height="20px"/>
		智慧碎片系统管理后台
	</div>
</div>
<div id="childNav">
	<div class="welcome wrap">
		管理员<span style="color:#660033">${sessionScope.user.userName }</span>您好,欢迎回到管理后台。
		<em><a href="${ basePath}new/userAction!logout.action"><span style="color:#660033;font-size:20px;">注销</span></a></em>
	</div>
</div>
<div id="main" class="wrap">
	<div id="menu-mng" class="lefter">
		<div class="box">
			<dl>
				<dt>用户管理</dt>
				<dd><em><a href="${ basePath}new/userAddAction.action">新增</a></em><a href="${ basePath}new/userAction!select.action">用户管理</a></dd>
				<dt>新闻管理</dt>
				<dd><em><a href="${ basePath}new/newsTypeAddAction.action">新增</a></em><a href="${ basePath}new/newsTypeAction!select.action">分类管理</a></dd>
				<dd><em><a href="${ basePath}new/newsAddAction.action">新增</a></em><a href="${ basePath}new/newsAction!select.action">新闻管理</a></dd>
				<dt>评论管理</dt>
				<dd><a href="${ basePath}new/commentAction!select.action">评论管理</a></dd>
			</dl>
		</div>
	</div>

<div class="main">
		<h2>添加新闻</h2>
		<div class="manage">
				<form action="${basePath }new/newsAction!add.action" method="post" enctype="multipart/form-data">
					<input type="hidden" name="news.newsAddress" value=" "/>
					<input type="hidden" name="news.newsStatus" value="0"/>
					<table class="form">
						<tr>
							<td class="field">新闻标题：</td>
							<td><input type="text" class="text" name="news.newsTitle" value="" /></td>
						</tr>
						<tr>
							<td class="field">新闻来源：</td>
							<td><input type="text" class="text" name="news.newsSource" value="" /></td>
						</tr>
						<tr>
							<td class="field">新闻图片：</td>
							<td><input type="file" name="file"/>
							新闻类型：
							<!-- 
							<select name="news.newsTypeName">
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
									<option value="体育">体育</option>
								</select>
							-->

							
							
							<s:select list="newsTypeList" id="dddd" name="news.newsTypeName" listKey="newsTypeName" 
							listValue="newsTypeName" headerKey="0" headerValue="--请选择子类型--" cssStyle="width:95px" value="1">
							 </s:select>
							
							</td>
						</tr>
						<tr>
							<td class="field">新闻内容：</td>
							<td><textarea name="news.newsContent"></textarea></td>
						</tr>
						<tr>
							<td></td>
							<td><label class="ui-blue"><input type="submit"
									name="submit" value="添加" /></label></td>
						</tr>
					</table>
				</form>
			</div>
	</div>
	<div class="clear"></div>
</div>
<div id="footer">
	Copyright &copy; 2013 智慧碎片 All Rights Reserved. 京ICP证1000001号
</div>
</body>
</html>
